class JsCallback {
  final String platform;
  final List<String> permission;

  JsCallback({required this.platform, required this.permission});

  factory JsCallback.fromJson(Map<String, dynamic> json) {
    return JsCallback(
      platform: json['platform'],
      permission: List<String>.from(json['permission']),
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'platform': platform ?? '',
      'permission': permission ?? [],
    };
  }
}
